home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 1.0 / CIncludes / string.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-18  |  2.2 KB  |  97 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3.     String.h
  4.     String handling
  5.     
  6.     Copyright Apple Computer,Inc.  1987-1990, 1993, 1994
  7.     All rights reserved
  8.  
  9. ************************************************************/
  10.  
  11.  
  12. #ifndef __STRING__
  13. #define __STRING__
  14.  
  15. #ifndef __size_t__
  16. #define __size_t__
  17. typedef unsigned int size_t;
  18. #endif
  19.  
  20. #ifndef NULL
  21. #define NULL 0
  22. #endif
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. /*
  29.  *    Copying functions
  30.  */
  31.  
  32. void *memcpy (void *s1, const void *s2, size_t n);
  33. void *memmove (void *s1, const void *s2, size_t n);
  34. char *strcpy (char *s1, const char *s2);
  35. char *strncpy (char *s1, const char *s2, size_t n);
  36.  
  37. /* Apple library extentions.  The prefered mechanism for enabling these is by defining
  38.  * __useAppleExts__.  In the absence of this symbol, the __STDC__ symbol is used to 
  39.  * enable or disable these extentions. */
  40.  
  41. /* CFront can't handle the pretty version of this conditional 
  42. #if defined (__useAppleExts__) || \
  43.     ((defined (applec) && ! defined (__STDC__)) || \
  44.      (defined (__PPCC__) && __STDC__ == 0))
  45. */
  46. #if defined (__useAppleExts__) || ((defined (applec) && ! defined (__STDC__)) || (defined (__PPCC__) && __STDC__ == 0))
  47.  
  48. void *memccpy(void *s1, const void *s2, int c, size_t n);
  49.  
  50. #endif
  51.  
  52. /*
  53.  *    Concatenation functions
  54.  */
  55.  
  56. char *strcat (char *s1, const char *s2);
  57. char *strncat (char *s1, const char *s2, size_t n);
  58.  
  59. /*
  60.  *    Comparison functions
  61.  */
  62.  
  63. int memcmp (const void *s1, const void *s2, size_t n);
  64. int strcmp (const char *s1, const char *s2);
  65. int strcoll (const char *s1, const char *s2);
  66. int strncmp (const char *s1, const char *s2, size_t n);
  67. size_t strxfrm (char *s1, const char *s2, size_t n);
  68.  
  69.  
  70. /*
  71.  *    Search functions
  72.  */
  73.  
  74. void *memchr (const void *s, int c, size_t n);
  75. char *strchr (const char *s, int c);
  76. size_t strcspn (const char *s1, const char *s2);
  77. char * strpbrk (const char *s1, const char *s2);
  78. char *strrchr (const char *s, int c);
  79. size_t strspn (const char *s1, const char *s2);
  80. char *strstr (const char *s1, const char *s2);
  81. char *strtok (char *s1, const char *s2);
  82.  
  83.  
  84. /*
  85.  *    Miscellaneous functions
  86.  */
  87.  
  88. void *memset (void *s, int c, size_t n);
  89. char *strerror (int errnum);
  90. size_t strlen (const char *s);
  91.  
  92. #ifdef __cplusplus
  93. }
  94. #endif
  95.  
  96. #endif
  97.